package models

import "go.didapinche.com/time"

// HostBatchTableName is table name of applications host
const HostResourceTableName = "t_host"

// HostBatch is model of application host
type HostResource struct {
	ID         uint64    `gorm:"primary_key,column:id" json:"id,omitempty" form:"id"`
	EnvID      uint64    `gorm:"column:env_id" json:"env_id" form:"env_id"`
	Env        string    `gorm:"column:env" json:"env" form:"env"`
	IP         string    `gorm:"column:ip" json:"ip" form:"ip"`
	Group      string    `gorm:"column:group" json:"group" form:"group"`
	DC         string    `gorm:"column:dc" json:"dc" form:"dc"`
	HostName   string    `gorm:"column:hostname" json:"hostname" form:"hostname"`
	Owner      string    `gorm:"column:owner" json:"owner" form:"owner"`
	IPOutside  string    `gorm:"column:ip_outside" json:"ip_outside" form:"ip_outside"`
	Name       string    `gorm:"-" json:"name" form:"name"`
	PageSize   uint64    `gorm:"-" json:"page_size" form:"page_size"`
	PageNum    uint64    `gorm:"-" json:"page_num" form:"page_num"`
	Score      uint64    `gorm:"column:score" json:"score" form:"score"`
	CreateTime time.Time `gorm:"column:create_time" json:"create_time,omitempty" form:"create_time"`
}

func (HostResource) TableName() string {
	return HostResourceTableName
}
